Page({
  data: {
    features: [
      {
        name: '作业',
        icon: '/assets/作业.png',
        path: '/pages/class/homework/index'
      },
      {
        name: '热门模板',
        icon: '/assets/热门模板.png',
        path: '/pages/class/templates/index'
      },
      {
        name: '通知',
        icon: '/assets/通知.png',
        path: '/pages/class/notice/index'
      },
      {
        name: '打卡',
        icon: '/assets/打卡.png',
        path: '/pages/class/checkin/index'
      }
    ]
  },
  onFeatureTap(e) {
    const path = e.currentTarget.dataset.path;
    if (path) {
      wx.navigateTo({ url: path });
    } else {
      wx.showToast({ title: '功能开发中', icon: 'none' });
    }
  }
});

